#ifndef PROMPTLINEEDIT_H
#define PROMPTLINEEDIT_H

#include <QLineEdit>


////////////////////////////////////////////
/// 带提示词的QLineEdit
///////////////////////////////////////////////
class PromptLineEdit : public QLineEdit
{
    Q_OBJECT
    // Q_PROPERTY(QString promptText READ promptText WRITE setPromptText)
public:
    explicit PromptLineEdit(QWidget *parent = nullptr);

    void setPromptText(const QString &text);
    QString promptText() const;

protected:
    void paintEvent(QPaintEvent *event) override;

private:
    QString m_prompt;
    QColor m_promptColor = QColor("#3E3A3A");
};

#endif // PROMPTLINEEDIT_H
